import { _decorator, Component, Canvas } from 'cc';
const { ccclass, property } = _decorator;


@ccclass('ChengYuUIManager')
export default class ChengYu_UIManager extends Component {
    static Instance: ChengYu_UIManager;
    @property(Canvas)
    canvas: Canvas | null = null;
    //    // @property(cc.Node)
    //    // UI_1: cc.Node = null;
    //    // @property(cc.Node)
    //    // UI_2: cc.Node = null;
    //    // @property(cc.Node)
    //    // UI_3: cc.Node = null;
    //    // @property(cc.Node)
    //    // Root_grid: cc.Node = null;
    //    // @property(cc.Node)
    //    // Root_card: cc.Node = null;
    //    // @property(cc.Node)
    //    // Root_effect: cc.Node = null;
    onLoad() {
        ChengYu_UIManager.Instance = this;

        for (let index = 0; index < this.node.children.length; index++) {
            let child = this.node.children[index];
            let active: boolean = child.active;
            child.active = true;
            child.active = active;
        }

        // XXL_UIManager.AddListener();

        // // 适配
        // this.node.getComponent(cc.Widget).updateAlignment();
        // this.Root_grid.scale
        //     = this.Root_card.scale
        //     = this.Root_effect.scale
        //     = this.node.height / 1600;
    }
    static AddListener() { }
}

// /** 调试 */
window["ChengYu_UIManager"] = ChengYu_UIManager;